//双色球
package text;

import java.lang.reflect.Array;
import java.util.Arrays;
import java.util.Random;

public class text_02 {
    public static void main(String[] args) {
        int [] r =zbsz(33);
        int [] b =zbsz(16);
        System.out.println(Arrays.toString(r));
        System.out.println(Arrays.toString(b));

        int [] red = selectRed(r);

        int blue = selectBlue(b);
        System.out.println("红球:"+ Arrays.toString(red));
        System.out.println("篮球:"+blue);

    }
    private static int[]zbsz(int n){
        int[] a = new int[n];
        for(int i =0;i<a.length;i++){
            a[i] =i+1;
        }
        return a;
    }

    private static int [] selectRed(int[] r){
        for(int i=0;i<6;i++){
            int j=i+new Random().nextInt(r.length+1);
            int t =r[i];
            r[i]=r[j];
            r[j]=t;
        }
        return Arrays.copyOf(r,6);
    }
    private static int selectBlue(int[] b){
        return b[new Random().nextInt(16)];
    }
}
